import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
    {
        path: '/',
        redirect: '/index'
    },
    {
        path: '/index',
        name: 'index',
        component: () => import('@/views/IndexView.vue'),
        meta: {
            keepAlive: true
        }
    },
    {
        path: '/home',
        name: 'home',
        component: () => import('@/views/HomeView.vue'),
        meta: {
            keepAlive: true
        }
    },
    {
        path: '/video',
        name: 'Video',
        component: () => import('@/views/VideoView.vue'),
        meta: {
            keepAlive: false
        }
    }
]

const router = createRouter({
    history: createWebHashHistory(process.env.BASE_URL),
    routes
})

export default router